how to do lcm